Skip to content

fix(gcpappengineservice): use metric.response_code in ErrorRate golden metric#3085

Open
sparsi17 wants to merge 1 commit into
newrelic:mainfrom
sparsi17:fix/gcpappengineservice-errorrate-response-code
Open

fix(gcpappengineservice): use metric.response_code in ErrorRate golden metric#3085
sparsi17 wants to merge 1 commit into
newrelic:mainfrom
sparsi17:fix/gcpappengineservice-errorrate-response-code

Conversation

@sparsi17

Copy link
Copy Markdown
Contributor

Summary

  • GCP metric label attributes are stored in NRDB with a metric. prefix (e.g. metric.response_code)
  • The ErrorRate golden metric filter used the bare attribute response_code, which is always null on gcp.appengine.http.server.response_count metrics
  • null NOT LIKE '2%' evaluates to true in NRQL, so every row matched the "error" filter → false 100% error rate displayed on all App Engine entities
  • Fix: change WHERE response_code NOT LIKE '2%'WHERE metric.response_code NOT LIKE '2%'

Root cause verified

Confirmed via live NRDB query on account 10516273 (staging), App Engine entity default (project beyonddev-193118):

  • Raw metric attribute: metric.response_code = '200'
  • Old query: ErrorRate = 100% (wrong — all requests were HTTP 200)
  • Fixed query: ErrorRate = 0% (correct)

Test plan

  • Verify FACET metric.response_code on gcp.appengine.http.server.response_count returns real response code values
  • Verify ErrorRate golden metric returns values < 100% for a healthy App Engine service
  • No change to gcpSample queries (legacy GcpAppEngineServiceSample uses bare response_code — different schema)

🤖 Generated with Claude Code

…n metric

GCP metric label attributes are stored in NR with a metric. prefix.
The ErrorRate query filtered on response_code (bare) which matched
every row (null NOT LIKE '2%' = true), producing a false 100% error rate.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

@entityBot entityBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beep boop bop.

I have found some errors processing these changes:

  • No valid, approved ARB ticket found in the PR description. This PR has to be reviewed by the API Review Board, please include a link to the ticket of that review in the PR description. Check how to start the process here or reach #api-review-board channel in case of doubts

@entityBot
entityBot requested a review from a team July 22, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants